<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Wimm.CustomContols">

    <Style TargetType="local:ExpenseDataGrid">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ExpenseDataGrid">
                    <Grid x:Name="LayoutRootGenericList">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="*"></RowDefinition>
                        </Grid.RowDefinitions>
                        <TextBlock Height="5"></TextBlock>
                        <ProgressBar Height="5" IsIndeterminate="True" Visibility="{TemplateBinding ProgressVisibility}"/>
                        <ListView Grid.Row="1" HeaderTemplate="{TemplateBinding HeaderTemplate}"/>
                        <ScrollViewer HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Grid.Row="2" VerticalScrollBarVisibility="Visible" x:Name="scrl" ViewChanged="ScrollViewer_ViewChanged">
                            <ListView SelectionMode="None" ItemsSource="{Binding Path=PagedGridData.ItemsList}" x:Name="lstBox" ItemTemplate="{Binding Path=ItemTemplate}"/>
                        </ScrollViewer>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:IncomeDataGrid">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:IncomeDataGrid">
                    <Grid x:Name="LayoutRootGenericList">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="*"></RowDefinition>
                        </Grid.RowDefinitions>
                        <TextBlock Height="5"></TextBlock>
                        <ProgressBar Height="5" IsIndeterminate="True" Visibility="{TemplateBinding ProgressVisibility}"/>
                        <ListView Grid.Row="1" HeaderTemplate="{TemplateBinding HeaderTemplate}"/>
                        <ScrollViewer HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Grid.Row="2" VerticalScrollBarVisibility="Visible" x:Name="scrl" ViewChanged="ScrollViewer_ViewChanged">
                            <ListView SelectionMode="None" ItemsSource="{Binding Path=PagedGridData.ItemsList}" x:Name="lstBox" ItemTemplate="{Binding Path=ItemTemplate}"/>
                        </ScrollViewer>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
